<?php session_start(); 
include 'datalogin.php';
?>
<html>
<head>


<title>Edit Project</title>


</head>
<body>

<?php
$query = mysql_query("SELECT * FROM project WHERE ProjectName = '".$_POST['projMenu']."'");
$projName = mysql_fetch_array($query);
$_SESSION['selectedCreator'] = $projName['CreatorID'];
$_SESSION['selectedProj'] = $_POST['projMenu'];
$_SESSION['selectedVers'] = $projName['Version'];
$_SESSION['selectedStatus'] = $projName['Status'];
$_SESSION['selectedDesc'] = $projName['Description'];
$today = date('o-m-d h:i:s');
$_SESSION['today'] = $today;

if($_SESSION['MemberID'] == $_SESSION['selectedCreator'])
{
echo "You're the Creator of this Project";
}
else
{
	echo"You're Not the Creator. If you want more functionality, please contact the Project Creator.";
}
?>


<form action="editThankYou.php" method="post" >

<fieldset>
	<label for ="name">Project Name: <input type = "text" name="name" value="<?php echo $projName['ProjectName']?>"/> </label> <br/>
	<label for ="vers">Version: <input type = "text" name="vers" value="<?php echo $projName['Version']?>"/></label> <br/>
	<label for = "status">Status: <input type = "text" name="status" value="<?php echo $projName['Status']?>"/></label> <br/>
		<hr /> <label for = "description">  Description:<br/>
		<textarea rows="6" cols="50" name="description">
		<?php echo $projName['Description'] ?>
		</textarea></label>
				<input type="hidden" value = "<?php echo $today ?>" />
		<input type="submit" value="Update Project"/>
</fieldset>
</form>


</body>
</html>